import pygame
from Map import Map
from base import BaseItem


class Wall(BaseItem):
    def __init__(self, left, top, hp, path):
        super(Wall, self).__init__()
        # 加载墙壁图片
        self.image = pygame.image.load(path)
        self.image = pygame.transform.scale(self.image, (60, 60))
        # 获取墙壁的区域
        self.rect = self.image.get_rect()
        # 设置位置
        self.rect.left = left
        self.rect.top = top
        # 是否显示
        self.live = True
        # 设置生命值
        self.hp = hp
